% Wiener滤波
img =imread("img/eight.tif");
subplot(2,3,1);imshow(img),xlabel("原始图像");
ju=imnoise(img,"salt & pepper",0.04);
subplot(2,3,2);imshow(ju),xlabel("噪声图像");

K1=wiener2(ju,[3,3]);
subplot(2,3,3);imshow(K1),xlabel("噪声图像3*3Wiener滤波");
K2=wiener2(ju,[5,5]);
subplot(2,3,4);imshow(K2),xlabel("噪声图像5*5Wiener滤波");
K3=wiener2(ju,[7,7]);
subplot(2,3,5);imshow(K3),xlabel("噪声图像7*7Wiener滤波");
K4=wiener2(ju,[9,9]);
subplot(2,3,6);imshow(K4),xlabel("噪声图像9*9Wiener滤波");